package org.wk.account.enums;

/**
 * @ClassName BaoChangeType
 * @Description
 * @Author ZhaoPing'an
 * @Date 2018/5/19 15:48
 */
public enum  BaoChangeType {
    RECEIVE_OTHERS("receive_others","他人鲸仔转赠"),
    TO_ZHONG("to_zhong","兑换鲸种"),
    ADMIN_UPDATE("admin_update","管理员操作");
    private String code;
    private String name;
    private BaoChangeType(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public static BaoChangeType containsCode(String code) {
        for (BaoChangeType item : BaoChangeType.values()) {
            if (item.getCode().equals(code)) {
                return item;
            }
        }
        return null;
    }

    /**
     * @return the code
     */

    public String getCode() {
        return code;
    }

    /**
     * @param code 要设置的 code
     */

    public void setCode(String code) {
        this.code = code;
    }
    /**
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * @param name 要设置的 name
     */

    public void setName(String name) {
        this.name = name;
    }
}
